package vip.xiaonuo.biz.modular.column.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.biz.modular.column.entity.BizColumn;
import vip.xiaonuo.biz.modular.column.param.BizColumnIdParam;
import vip.xiaonuo.biz.modular.column.service.BizColumnService;
import vip.xiaonuo.common.pojo.CommonResult;

import javax.annotation.Resource;
import java.util.List;


@RequestMapping("/client/column")
@RestController
public class ClientColumnController {

    @Resource
    private BizColumnService service;

    @GetMapping("/list")
    public CommonResult<List<BizColumn>> list(){
        return CommonResult.data(service.list());
    }


    @GetMapping("/addViewCount")
    public void addViewCount(BizColumnIdParam idParam){
        service.addViewCount(idParam);
    }
}
